import $ from "jquery";
import Rx from "rxjs";
$(function () {
  let ds = new Message(
    "59cb7a71-2b71-480a-a193-4b4fc9b63458",
    null,
    "deepseek-r1",
    "https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png",
    "assistant",
    null,
    null,
    null
  );
  ds.renderMessage($(".chat-container"));
  let user = new Message(
    "59cb7a71-2b71-480a-a193-4b4fc9b634990",
    null,
    "xiaochangming",
    "https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png",
    "user",
    null,
    null,
    null
  );
  user.renderMessage($(".chat-container"));
  let tt = new TextTool("asdfasdfasdf", "你好,很高兴为您服务");
  ds.appendTool(tt);
  user.appendTool(tt);
  
  
  setInterval(() => {
    // 随机生成一个单词
    let word = Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
    tt.stream(word)
  }, 1000);
});
